 package org.mybatis.util;
 
 import java.lang.reflect.Field;
import java.util.HashSet;
import java.util.Set;

import org.springframework.util.ReflectionUtils.FieldFilter;
 
 public class DefaultFieldFilter implements FieldFilter{
   private Set<String> parentColSet = new HashSet();
   
   public DefaultFieldFilter(String[] cols) {
     for (String item : cols) {
       this.parentColSet.add(item);
     }
   }
   
   public boolean matches(Field field)
   {
     return this.parentColSet.contains(field.getName());
   }
 }